from pydantic import BaseModel
from typing import List

class Title(BaseModel):
    text: str = None
    subtext: str = None

class VisualMapPiece(BaseModel):
    lte: int = None
    gt: int = None
    color: str = None

class MarkAreaItem(BaseModel):
    name: str = None
    xAxis: str = None

class ChartSum(BaseModel):
    danwei: str = ""
    name: str = ""
    max: int = 0
    min: int = 0
    limitValue: int = 0
    limitValue2: int = 0
    title: Title = Title()
    xAxisData: List[str] = []
    yAxisLabelFormatter: str = None
    visualMapPieces: List[dict] = []
    seriesData: List[float] = []
    markAreaData: List[List[MarkAreaItem]] = []
    legend_data:List[str] = []